<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script>
    function Computer(color,weight,brand,model,skill) {
        this.color = color;
        this.weight = weight;
        this.brand = brand;
        this.model = model;
        this.skill = skill;
    }
    var obj = new Computer('黑色',2.3+'KG',"华为",'MateBook 13','轻薄');
    for (var k in obj){
        console.log(obj[k]);
    }
    function Button(width,height,background) {
        this.width = width;
        this.height = height;
        this.background = background;
        this.fun = function () {
            console.log('我好帅！！！！！');
        }
    }
    var obj1 = new Button('20px','20px','yellow');
    for (var key in obj1){
        console.log(obj1[key]);
    }

    obj1.fun();
</script>
<body>

</body>
</html>